#!/bin/bash
#openssl genrsa -out server.key -des 1024
#openssl req -new -key server.key -x509 -out server.crt -config /etc/ssl/openssl.cnf
keytool -genkeypair -alias FBI -keysize 1024 -keystore FBI.jks -storepass storepass -keypass keystore
keytool -certreq -alias FBI -keypass keystore -keystore FBI.jks -storepass storepass -file FBI.csr
openssl x509 -req -in FBI.csr -CA server.crt -CAkey server.key -out FBI.crt -CAcreateserial -CAserial server.seq
keytool -importcert -alias server_crt -keypass keystore -file server.crt -keystore FBI.jks -storepass storepass
keytool -importcert -alias FBI -keypass keystore -file FBI.crt -keystore FBI.jks -storepass storepass
